<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div>

    </div>
    <script>
        var div = document.querySelector('div');
        div.onmousedown = function () {
            console.log("div被点击了");
        }
        div.ontouchstart = function (e) {
            e.preventDefault();
            console.log("手指按下事件");
        }
        
        div.ontouchend = function () {
            console.log("手指抬起事件");
        }
        div.ontouchmove = function () {
            console.log("手指移动事件");
        }
    </script>
</body>

</html>